package com.lagou.edu.factory.parsing;

import java.util.HashMap;
import java.util.Map;

public class BeanPool {
    //以beanName为key的beans池
    private Map<String,Object> beansMap;
    //以类型为key的beans池，用于@Autowired，使用类名自动装配
    private Map<String,Object> beansMapWithClassName;
    private String basePackage;

    public BeanPool(){
        this.beansMap = new HashMap<>();
        this.beansMapWithClassName = new HashMap<>();
        this.basePackage = "";
    }

    public Map<String, Object> getBeansMap() {
        return beansMap;
    }

    public void setBeansMap(Map<String, Object> beansMap) {
        this.beansMap = beansMap;
    }

    public Map<String, Object> getBeansMapWithClassName() {
        return beansMapWithClassName;
    }

    public void setBeansMapWithClassName(Map<String, Object> beansMapWithClassName) {
        this.beansMapWithClassName = beansMapWithClassName;
    }

    public String getBasePackage() {
        return basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }

    @Override
    public String toString() {
        return "ParseResult{" +
                "beansMap=" + beansMap +
                ", beansMapWithClassName=" + beansMapWithClassName +
                ", basePackage='" + basePackage + '\'' +
                '}';
    }
}
